<?php
/**
 * Created by 784855684@qq.com.
 * Link: https://github.com/lichtung/wshore
 * User: linzh
 * Date: 7/22/17
 * Time: 9:40 PM
 */
declare(strict_types=1);

use Swoole\Http\Request;
use Swoole\Http\Response;

$http = new \Swoole\Http\Server("127.0.0.1", 8000);
$http->on('request',
    /**
     * @param Request $request
     * @param Response $response
     */
    function ($request, $response) {
        $response->end("<h1>Hello Swoole</h1>");
    });
$http->start();